package com.example.system.service;

import com.aliyun.oss.ClientException;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.common.utils.R;
import com.example.system.entity.Files;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 王鹤蒲
 * @since 2023-08-08
 */
public interface IFileService extends IService<Files> {

    public R upload(MultipartFile file) throws IOException;

    public R uploadOSS(MultipartFile file) throws IOException, ClientException;

    public R uploadBatch(MultipartFile [] files) throws IOException;

    public void download(String fileUUID, HttpServletResponse respons) throws IOException;

    public void downloadByOSS(String fileUUID, HttpServletResponse response) throws IOException;
    public R deleteById(Integer id);

    public R deleteBatchByIds(Integer[] ids);

    public R selectAll(int currentPage,int pageSize,String name);

    public R update(Files file);
}
